// CreditCardPayment.java
public class CreditCardPayment implements Payment {
    public CreditCardPayment(String cardNumber, String expiryDate) {
    }
    
    @Override
    public boolean pay(double amount) {
        System.out.println("处理信用卡支付: ¥" + amount);
        // 模拟支付处理
        return Math.random() > 0.1; // 90%成功率
    }
    
    @Override
    public String getPaymentMethod() {
        return "信用卡";
    }
}